home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / sprint2.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  17KB  |  425 lines

  1. /***************************************************************************
  2.  
  3. Atari Sprint2 Driver
  4.  
  5. Memory Map:
  6.         0000-03FF       WRAM
  7.         0400-07FF       R: RAM and DISPLAY, W: DISPLAY
  8.         0800-0BFF       R: SWITCH
  9.         0C00-0FFF       R: SYNC
  10.         0C00-0C0F       W: ATTRACT
  11.         0C10-0C1F       W: SKID1
  12.         0C20-0C2F       W: SKID2
  13.         0C30-0C3F       W: LAMP1
  14.         0C40-0C4F       W: LAMP2
  15.         0C60-0C6F       W: SPARE
  16.         0C80-0CFF       W: TIMER RESET (Watchdog)
  17.         0D00-0D7F       W: COLLISION RESET 1
  18.         0D80-0DFF       W: COLLISION RESET 2
  19.         0E00-0E7F       W: STEERING RESET 1
  20.         0E80-0EFF       W: STEERING RESET 2
  21.         0F00-0F7F       W: NOISE RESET
  22.         1000-13FF       R: COLLISION1
  23.         1400-17FF       R: COLLISION2
  24.         2000-23FF       PROM1 (Playfield ROM1)
  25.         2400-27FF       PROM2 (Playfield ROM1)
  26.         2800-2BFF       PROM3 (Playfield ROM2)
  27.         2C00-2FFF       PROM4 (Playfield ROM2)
  28.         3000-33FF       PROM5 (Program ROM1)
  29.         3400-37FF       PROM6 (Program ROM1)
  30.         3800-3BFF       PROM7 (Program ROM2)
  31.         3C00-3FFF       PROM8 (Program ROM2)
  32.        (FC00-FFFF)      PROM8 (Program ROM2) - only needed for the 6502 vectors
  33.  
  34. If you have any questions about how this driver works, don't hesitate to
  35. ask.  - Mike Balfour (mab22@po.cwru.edu)
  36. ***************************************************************************/
  37.  
  38. #include "driver.h"
  39. #include "vidhrdw/generic.h"
  40.  
  41. /* vidhrdw/sprint2.c */
  42. extern void sprint1_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  43. extern void sprint2_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  44. extern int sprint2_vh_start(void);
  45. extern void sprint2_vh_stop(void);
  46. extern unsigned char *sprint2_vert_car_ram;
  47. extern unsigned char *sprint2_horiz_ram;
  48.  
  49. /* machine/sprint2.c */
  50. READ_HANDLER( sprint1_read_ports_r );
  51. READ_HANDLER( sprint2_read_ports_r );
  52. READ_HANDLER( sprint2_read_sync_r );
  53. READ_HANDLER( sprint2_coins_r );
  54. READ_HANDLER( sprint2_steering1_r );
  55. READ_HANDLER( sprint2_steering2_r );
  56. READ_HANDLER( sprint2_collision1_r );
  57. READ_HANDLER( sprint2_collision2_r );
  58. WRITE_HANDLER( sprint2_collision_reset1_w );
  59. WRITE_HANDLER( sprint2_collision_reset2_w );
  60. WRITE_HANDLER( sprint2_steering_reset1_w );
  61. WRITE_HANDLER( sprint2_steering_reset2_w );
  62. WRITE_HANDLER( sprint2_lamp1_w );
  63. WRITE_HANDLER( sprint2_lamp2_w );
  64.  
  65.  
  66. static struct MemoryReadAddress readmem[] =
  67. {
  68.     { 0x0000, 0x03ff, MRA_RAM }, /* WRAM */
  69.     { 0x0400, 0x07ff, MRA_RAM }, /* DISPLAY RAM */
  70.     { 0x0800, 0x083f, sprint2_read_ports_r }, /* SWITCH */
  71.     { 0x0840, 0x087f, sprint2_coins_r },
  72.     { 0x0880, 0x08bf, sprint2_steering1_r },
  73.     { 0x08c0, 0x08ff, sprint2_steering2_r },
  74.     { 0x0900, 0x093f, sprint2_read_ports_r }, /* SWITCH */
  75.     { 0x0940, 0x097f, sprint2_coins_r },
  76.     { 0x0980, 0x09bf, sprint2_steering1_r },
  77.     { 0x09c0, 0x09ff, sprint2_steering2_r },
  78.     { 0x0a00, 0x0a3f, sprint2_read_ports_r }, /* SWITCH */
  79.     { 0x0a40, 0x0a7f, sprint2_coins_r },
  80.     { 0x0a80, 0x0abf, sprint2_steering1_r },
  81.     { 0x0ac0, 0x0aff, sprint2_steering2_r },
  82.     { 0x0b00, 0x0b3f, sprint2_read_ports_r }, /* SWITCH */
  83.     { 0x0b40, 0x0b7f, sprint2_coins_r },
  84.     { 0x0b80, 0x0bbf, sprint2_steering1_r },
  85.     { 0x0bc0, 0x0bff, sprint2_steering2_r },
  86.     { 0x0c00, 0x0fff, sprint2_read_sync_r }, /* SYNC */
  87.     { 0x1000, 0x13ff, sprint2_collision1_r }, /* COLLISION 1 */
  88.     { 0x1400, 0x17ff, sprint2_collision2_r }, /* COLLISION 2 */
  89.     { 0x2000, 0x3fff, MRA_ROM }, /* PROM1-PROM8 */
  90.     { 0xfff0, 0xffff, MRA_ROM }, /* PROM8 for 6502 vectors */
  91.     { -1 }    /* end of table */
  92. };
  93.  
  94. static struct MemoryWriteAddress writemem[] =
  95. {
  96.     { 0x0000, 0x03ff, MWA_RAM }, /* WRAM */
  97.     { 0x0010, 0x0013, MWA_RAM, &sprint2_horiz_ram }, /* WRAM */
  98.     { 0x0018, 0x001f, MWA_RAM, &sprint2_vert_car_ram }, /* WRAM */
  99.     { 0x0400, 0x07ff, videoram_w, &videoram, &videoram_size }, /* DISPLAY */
  100.     { 0x0c00, 0x0c0f, MWA_RAM }, /* ATTRACT */
  101.     { 0x0c10, 0x0c1f, MWA_RAM }, /* SKID1 */
  102.     { 0x0c20, 0x0c2f, MWA_RAM }, /* SKID2 */
  103.     { 0x0c30, 0x0c3f, sprint2_lamp1_w }, /* LAMP1 */
  104.     { 0x0c40, 0x0c4f, sprint2_lamp2_w }, /* LAMP2 */
  105.     { 0x0c60, 0x0c6f, MWA_RAM }, /* SPARE */
  106.     { 0x0c80, 0x0cff, MWA_NOP }, /* TIMER RESET (watchdog) */
  107.     { 0x0d00, 0x0d7f, sprint2_collision_reset1_w }, /* COLLISION RESET 1 */
  108.     { 0x0d80, 0x0dff, sprint2_collision_reset2_w }, /* COLLISION RESET 2 */
  109.     { 0x0e00, 0x0e7f, sprint2_steering_reset1_w }, /* STEERING RESET 1 */
  110.     { 0x0e80, 0x0eff, sprint2_steering_reset2_w }, /* STEERING RESET 2 */
  111.     { 0x0f00, 0x0f7f, MWA_RAM }, /* NOISE RESET */
  112.     { 0x2000, 0x3fff, MWA_ROM }, /* PROM1-PROM8 */
  113.     { -1 }    /* end of table */
  114. };
  115.  
  116. /* The only difference is that we use "sprint1_read_ports" */
  117. static struct MemoryReadAddress sprint1_readmem[] =
  118. {
  119.     { 0x0000, 0x03ff, MRA_RAM }, /* WRAM */
  120.     { 0x0400, 0x07ff, MRA_RAM }, /* DISPLAY RAM */
  121.     { 0x0800, 0x083f, sprint1_read_ports_r }, /* SWITCH */
  122.     { 0x0840, 0x087f, sprint2_coins_r },
  123.     { 0x0880, 0x08bf, sprint2_steering1_r },
  124.     { 0x08c0, 0x08ff, sprint2_steering2_r },
  125.     { 0x0900, 0x093f, sprint1_read_ports_r }, /* SWITCH */
  126.     { 0x0940, 0x097f, sprint2_coins_r },
  127.     { 0x0980, 0x09bf, sprint2_steering1_r },
  128.     { 0x09c0, 0x09ff, sprint2_steering2_r },
  129.     { 0x0a00, 0x0a3f, sprint1_read_ports_r }, /* SWITCH */
  130.     { 0x0a40, 0x0a7f, sprint2_coins_r },
  131.     { 0x0a80, 0x0abf, sprint2_steering1_r },
  132.     { 0x0ac0, 0x0aff, sprint2_steering2_r },
  133.     { 0x0b00, 0x0b3f, sprint1_read_ports_r }, /* SWITCH */
  134.     { 0x0b40, 0x0b7f, sprint2_coins_r },
  135.     { 0x0b80, 0x0bbf, sprint2_steering1_r },
  136.     { 0x0bc0, 0x0bff, sprint2_steering2_r },
  137.     { 0x0c00, 0x0fff, sprint2_read_sync_r }, /* SYNC */
  138.     { 0x1000, 0x13ff, sprint2_collision1_r }, /* COLLISION 1 */
  139.     { 0x1400, 0x17ff, sprint2_collision2_r }, /* COLLISION 2 */
  140.     { 0x2000, 0x3fff, MRA_ROM }, /* PROM1-PROM8 */
  141.     { 0xfff0, 0xffff, MRA_ROM }, /* PROM8 for 6502 vectors */
  142.     { -1 }    /* end of table */
  143. };
  144.  
  145. INPUT_PORTS_START( sprint2 )
  146.     PORT_START      /* DSW - fake port, gets mapped to Sprint2 ports */
  147.     PORT_DIPNAME( 0x01, 0x00, "Tracks on Demo" )
  148.     PORT_DIPSETTING(    0x00, "Easy Track Only" )
  149.     PORT_DIPSETTING(    0x01, "Cycle 12 Tracks" )
  150.     PORT_DIPNAME( 0x02, 0x00, "Oil Slicks" )
  151.     PORT_DIPSETTING(    0x02, DEF_STR( No ) )
  152.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  153.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage )  )
  154.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  155.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  156.     PORT_DIPSETTING(    0x04, DEF_STR( 1C_2C ) )
  157.     PORT_DIPSETTING(    0x0c, DEF_STR( Free_Play ) )
  158.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused) )
  159.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  160.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  161.     PORT_DIPNAME( 0x20, 0x00, "Allow Extended Play" )
  162.     PORT_DIPSETTING(    0x20, DEF_STR( No ) )
  163.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  164.     PORT_DIPNAME( 0xc0, 0x00, "Real Game Length" )
  165.     PORT_DIPSETTING(    0xc0, "60 seconds" )
  166.     PORT_DIPSETTING(    0x80, "90 seconds" )
  167.     PORT_DIPSETTING(    0x40, "120 seconds" )
  168.     PORT_DIPSETTING(    0x00, "150 seconds" )
  169.  
  170.     PORT_START      /* IN0 - fake port, gets mapped to Sprint2 ports */
  171.     PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN,  "P1 1st gear", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  172.     PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT,  "P1 2nd gear", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  173.     PORT_BITX(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT, "P1 3rd gear", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  174.     PORT_BITX(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP,    "P1 4th gear", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  175.     PORT_BITX(0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_PLAYER2, "P2 1st gear", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  176.     PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_PLAYER2, "P2 2nd gear", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  177.     PORT_BITX(0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_PLAYER2, "P2 3rd gear", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  178.     PORT_BITX(0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_PLAYER2, "P2 4th gear", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  179.  
  180.     PORT_START      /* IN1 - fake port, gets mapped to Sprint2 ports */
  181.     PORT_BITX(0x01, IP_ACTIVE_LOW, IPT_BUTTON1, "P1 Gas", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  182.     PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2, "P2 Gas", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  183.     PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_SERVICE, "Self Test", KEYCODE_F2, IP_JOY_NONE )
  184.     PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_START1 )
  185.     PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_START2 )
  186.     PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_BUTTON2, "Track Select", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  187.  
  188.     PORT_START      /* IN2 */
  189.     PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_VBLANK )
  190.     PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  191.  
  192.     PORT_START      /* IN3 */
  193.     PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
  194.     PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
  195.  
  196.     PORT_START      /* IN4 */
  197.     PORT_ANALOG( 0xff, 0x00, IPT_DIAL, 100, 10, 0, 0 )
  198.  
  199.  
  200.     PORT_START      /* IN5 */
  201.     PORT_ANALOG( 0xff, 0x00, IPT_DIAL | IPF_PLAYER2, 100, 10, 0, 0 )
  202. INPUT_PORTS_END
  203.  
  204.  
  205. INPUT_PORTS_START( sprint1 )
  206.     PORT_START      /* DSW - fake port, gets mapped to Sprint2 ports */
  207.     PORT_DIPNAME( 0x01, 0x00, "Change Track" )
  208.     PORT_DIPSETTING(    0x01, "Every Lap" )
  209.     PORT_DIPSETTING(    0x00, "Every 2 Laps" )
  210.     PORT_DIPNAME( 0x02, 0x00, "Oil Slicks" )
  211.     PORT_DIPSETTING(    0x02, DEF_STR( No ) )
  212.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  213.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage )  )
  214.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  215.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  216.     PORT_DIPSETTING(    0x04, DEF_STR( 1C_2C ) )
  217.     PORT_DIPSETTING(    0x0c, DEF_STR( Free_Play ) )
  218.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused) )
  219.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  220.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  221.     PORT_DIPNAME( 0x20, 0x00, "Allow Extended Play" )
  222.     PORT_DIPSETTING(    0x20, DEF_STR( No ) )
  223.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  224.     PORT_DIPNAME( 0xc0, 0x00, "Real Game Length" )
  225.     PORT_DIPSETTING(    0xc0, "60 seconds" )
  226.     PORT_DIPSETTING(    0x80, "90 seconds" )
  227.     PORT_DIPSETTING(    0x40, "120 seconds" )
  228.     PORT_DIPSETTING(    0x00, "150 seconds" )
  229.  
  230.     PORT_START      /* IN0 - fake port, gets mapped to Sprint2 ports */
  231.     PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN,  "1st gear", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  232.     PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT,  "2nd gear", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  233.     PORT_BITX(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT, "3rd gear", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  234.     PORT_BITX(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP,    "4th gear", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  235.     PORT_BIT (0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  236.  
  237.     PORT_START      /* IN1 - fake port, gets mapped to Sprint2 ports */
  238.     PORT_BITX(0x01, IP_ACTIVE_LOW, IPT_BUTTON1, "Gas", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  239.     PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_SERVICE, "Self Test", KEYCODE_F2, IP_JOY_NONE )
  240.     PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_START1 )
  241.  
  242.     PORT_START      /* IN2 */
  243.     PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_VBLANK )
  244.     PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  245.  
  246.     PORT_START      /* IN3 */
  247.     PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
  248.     PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
  249.  
  250.     PORT_START      /* IN4 */
  251.     PORT_ANALOG( 0xff, 0x00, IPT_DIAL, 100, 10, 0, 0 )
  252.  
  253.  
  254.     PORT_START      /* IN5 */
  255.     PORT_BIT ( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  256. INPUT_PORTS_END
  257.  
  258.  
  259. static struct GfxLayout charlayout =
  260. {
  261.     8,8,    /* 8*8 characters */
  262.         64,     /* 64 characters */
  263.         1,      /* 1 bit per pixel */
  264.         { 0 },        /* no separation in 1 bpp */
  265.         { 4, 5, 6, 7, 0x200*8 + 4, 0x200*8 + 5, 0x200*8 + 6, 0x200*8 + 7 },
  266.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  267.     8*8    /* every char takes 8 consecutive bytes */
  268. };
  269.  
  270. static struct GfxLayout carlayout =
  271. {
  272.         16,8,    /* 16*8 characters */
  273.         32,      /* 32 characters */
  274.         1,       /* 1 bit per pixel */
  275.         { 0 },        /* no separation in 1 bpp */
  276.         { 7, 6, 5, 4, 0x200*8 + 7, 0x200*8 + 6, 0x200*8 + 5, 0x200*8 + 4,
  277.           15, 14, 13, 12, 0x200*8 + 15, 0x200*8 + 14, 0x200*8 + 13, 0x200*8 + 12  },
  278.         { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  279.         16*8     /* every char takes 16 consecutive bytes */
  280. };
  281.  
  282. static struct GfxDecodeInfo gfxdecodeinfo[] =
  283. {
  284.     { REGION_GFX1, 0, &charlayout, 0, 2 },
  285.     { REGION_GFX2, 0, &carlayout,  4, 4 },
  286.     { -1 } /* end of array */
  287. };
  288.  
  289. static unsigned char palette[] =
  290. {
  291.         0x00,0x00,0x00, /* BLACK - oil slicks, text, black car */
  292.         0x55,0x55,0x55, /* DK GREY - default background */
  293.         0x80,0x80,0x80, /* LT GREY - grey cars */
  294.         0xff,0xff,0xff, /* WHITE - track, text, white car */
  295. };
  296. static unsigned short colortable[] =
  297. {
  298.         0x01, 0x00, /* Black playfield */
  299.         0x01, 0x03, /* White playfield */
  300.         0x01, 0x03, /* White car */
  301.         0x01, 0x00, /* Black car */
  302.         0x01, 0x02, /* Grey car 1 */
  303.         0x01, 0x02  /* Grey car 2 */
  304. };
  305. static void init_palette(unsigned char *game_palette, unsigned short *game_colortable,const unsigned char *color_prom)
  306. {
  307.     memcpy(game_palette,palette,sizeof(palette));
  308.     memcpy(game_colortable,colortable,sizeof(colortable));
  309. }
  310.  
  311.  
  312. static struct MachineDriver machine_driver_sprint2 =
  313. {
  314.     /* basic machine hardware */
  315.     {
  316.         {
  317.             CPU_M6502,
  318.             333333,        /* 0.3 Mhz ???? */
  319.             readmem,writemem,0,0,
  320.             interrupt,1
  321.         }
  322.     },
  323.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  324.     1,    /* single CPU, no need for interleaving */
  325.     0,
  326.  
  327.     /* video hardware */
  328.     32*8, 32*8, { 0*8, 32*8-1, 0*8, 32*8-1 }, /* it's actually 32x28, but we'll leave room for our gear indicator */
  329.     gfxdecodeinfo,
  330.     sizeof(palette) / sizeof(palette[0]) / 3, sizeof(colortable) / sizeof(colortable[0]),
  331.     init_palette,
  332.  
  333.     VIDEO_TYPE_RASTER,
  334.     0,
  335.     sprint2_vh_start,
  336.     sprint2_vh_stop,
  337.     sprint2_vh_screenrefresh,
  338.  
  339.     /* sound hardware */
  340.     0,0,0,0
  341. };
  342.  
  343. static struct MachineDriver machine_driver_sprint1 =
  344. {
  345.     /* basic machine hardware */
  346.     {
  347.         {
  348.             CPU_M6502,
  349.             333333,        /* 0.3 Mhz ???? */
  350.             sprint1_readmem,writemem,0,0,
  351.             interrupt,1
  352.         }
  353.     },
  354.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  355.     1,    /* single CPU, no need for interleaving */
  356.     0,
  357.  
  358.     /* video hardware */
  359.     32*8, 32*8, { 0*8, 32*8-1, 0*8, 32*8-1 }, /* it's actually 32x28, but we'll leave room for our gear indicator */
  360.     gfxdecodeinfo,
  361.     sizeof(palette) / sizeof(palette[0]) / 3, sizeof(colortable) / sizeof(colortable[0]),
  362.     init_palette,
  363.  
  364.     VIDEO_TYPE_RASTER,
  365.     0,
  366.     sprint2_vh_start,
  367.     sprint2_vh_stop,
  368.     sprint1_vh_screenrefresh,
  369.  
  370.     /* sound hardware */
  371.     0,0,0,0
  372.  
  373. };
  374.  
  375.  
  376.  
  377.  
  378.  
  379. /***************************************************************************
  380.  
  381.   Game ROMs
  382.  
  383. ***************************************************************************/
  384.  
  385. ROM_START( sprint1 )
  386.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  387.     ROM_LOAD( "6290-01.b1",   0x2000, 0x0800, 0x41fc985e )
  388.     ROM_LOAD( "6291-01.c1",   0x2800, 0x0800, 0x07f7a920 )
  389.     ROM_LOAD( "6442-01.d1",   0x3000, 0x0800, 0xe9ff0124 )
  390.     ROM_RELOAD(               0xf000, 0x0800 )
  391.     ROM_LOAD( "6443-01.e1",   0x3800, 0x0800, 0xd6bb00d0 )
  392.     ROM_RELOAD(               0xf800, 0x0800 )
  393.  
  394.     ROM_REGION( 0x0400, REGION_GFX1 | REGIONFLAG_DISPOSE )
  395.     ROM_LOAD( "6396-01.p4",   0x0000, 0x0200, 0x801b42dd )
  396.     ROM_LOAD( "6397-01.r4",   0x0200, 0x0200, 0x135ba1aa )
  397.  
  398.     ROM_REGION( 0x0400, REGION_GFX2 | REGIONFLAG_DISPOSE )
  399.     ROM_LOAD( "6398-01.k6",   0x0000, 0x0200, 0xc9e1017e )
  400.     ROM_LOAD( "6399-01.j6",   0x0200, 0x0200, 0x63d685b2 )
  401. ROM_END
  402.  
  403. ROM_START( sprint2 )
  404.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  405.     ROM_LOAD( "6290-01.b1",   0x2000, 0x0800, 0x41fc985e )
  406.     ROM_LOAD( "6291-01.c1",   0x2800, 0x0800, 0x07f7a920 )
  407.     ROM_LOAD( "6404sp2.d1",   0x3000, 0x0800, 0xd2878ff6 )
  408.     ROM_RELOAD(               0xf000, 0x0800 )
  409.     ROM_LOAD( "6405sp2.e1",   0x3800, 0x0800, 0x6c991c80 )
  410.     ROM_RELOAD(               0xf800, 0x0800 )
  411.  
  412.     ROM_REGION( 0x0400, REGION_GFX1 | REGIONFLAG_DISPOSE )
  413.     ROM_LOAD( "6396-01.p4",   0x0000, 0x0200, 0x801b42dd )
  414.     ROM_LOAD( "6397-01.r4",   0x0200, 0x0200, 0x135ba1aa )
  415.  
  416.     ROM_REGION( 0x0400, REGION_GFX2 | REGIONFLAG_DISPOSE )
  417.     ROM_LOAD( "6398-01.k6",   0x0000, 0x0200, 0xc9e1017e )
  418.     ROM_LOAD( "6399-01.j6",   0x0200, 0x0200, 0x63d685b2 )
  419. ROM_END
  420.  
  421.  
  422.  
  423. GAMEX( 1978, sprint1, 0,       sprint1, sprint1, 0, ROT0, "Atari", "Sprint 1", GAME_NO_SOUND )
  424. GAMEX( 1976, sprint2, sprint1, sprint2, sprint2, 0, ROT0, "Atari", "Sprint 2", GAME_NO_SOUND )
  425.